Use ParseArrayPipe to handle both repeated key format (?ids=1&ids=2) and comma-separated format (?ids=1,2,3). Pass an items pipe for per-element transformation and a separator option for comma-separated strings. For DTO-based validation use @Transform() to split the string before class-validator runs.
ParseArrayPipe with no separator option handles repeated keys: ?tag=a&tag=b.
ParseArrayPipe with separator: ',' handles comma-separated values: ?tag=a,b,c.
The items option applies a pipe to each element in the parsed array for per-item transformation.
@Transform() in a DTO is the most flexible approach — handles both formats with custom logic.
Always add @IsArray() before per-item validators to ensure the value is an array before iterating.